<template>
	<view class="uni-margin-wrap">
		<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
			:duration="duration">
			<swiper-item v-for="(item,index) in listImg" :key="index">
				<view class="swiper-item">
					<image :src="item.imagUrl" class="img" />
				</view>
			</swiper-item>
		</swiper>
	</view>
</template>

<script>
	export default {
		name: "SwiperCom",
		data() {
			return {
				autoplay: true,
				interval: 2000,
				duration: 500,
				indicatorDots: true
			};
		},
		props: {
			listImg: {
				type: Array,
				default () {
					return []
				}
			},
		},
	}
</script>

<style lang="scss">
	.uni-margin-wrap {
		height: 350rpx;
		width: 100%;

		.swiper {
			height: inherit;

			.swiper-item {
				display: block;
				height: inherit;
				line-height: 300rpx;
				text-align: center;
				background-color: $uni-bg-color-grey;

				.img {
					width: 100%;
					height: inherit;
				}
			}
		}
	}
</style>
